<template>
  <div>
    <com :tableData="tableData" :columnArr="columnArr"></com>
    <json-viewer :expand-depth="2" :boxed="true" :copyable="{copyText: '复制', copiedText: '已复制', timeout: 2000} " :expanded="true" :value="tableData"></json-viewer>
  </div>
</template>

<script>
import com from './com.vue'
export default {
  components: { com },
  data () {
    return {
      tableData: [
        {
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          id: 1
        },
        {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄',
          id: 2
        },
        {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄',
          id: 3
        },
        {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄',
          id: 4
        }
      ],
      columnArr: [
        { label: '日期', value: 'date' },
        { label: '姓名', value: 'name' },
        { label: '地址', value: 'address' }
      ]
    }
  }
}
</script>

<style>
</style>
